package com.genius.service;

import com.genius.feign.LogServiceFeign;
import com.genius.monitor.pojo.OperationLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import static com.genius.constant.SecurityConstants.INNER;

/**
 * 异步调用操作日志服务
 */
@Service
public class AsyncLogService
{
    @Autowired
    private LogServiceFeign logServiceFeign;

    /**
     * 保存系统日志记录
     */
    @Async
    public void saveOperationLog(OperationLog operationLog) {
        logServiceFeign.insertOperationLog(operationLog,INNER);
    }
}
